// raster.hpp : Defines bitmap object, that stores raster data and writes it to the file
//

#ifndef RASTER_HPP_INCLUDE
#define RASTER_HPP_INCLUDE

#include "types.hpp"

using namespace std;

class Raster
{
private:
	Color *data_;
	int width_, height_;

	static double clamp(double a);
	Raster();
public:
	Raster(int width, int height);
	~Raster();

	void setPixel(int x, int y, const Color& c);
	Color& getPixel(int x, int y) const;
	int getWidth() const;
	int getHeight() const;
	void writePPM(const char* filename) const;
};

#endif //RASTER_HPP_INCLUDE